package clustering;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Map;

import thesis.DataObject;


import com.aliasi.util.FeatureExtractor;
import com.aliasi.util.Pair;

public class PinakiFeatureExtractor<T> implements FeatureExtractor<DataObject> {

	public Map<String, ? extends Number> features(DataObject memoryTweet) {
		Map<String, Double> features = new Hashtable<String, Double>();
		
		ArrayList<Pair<Double, ArrayList<Double>>> rels = memoryTweet.getRels();
		
		int count = 1;
		for (Pair<Double, ArrayList<Double>> pair : rels){
			for (Double featureValue : pair.b()){
				features.put("feature" + count, featureValue);
				count++;
			}
		}
		
		return features;
	}

}
